<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>巡查</title>
		<link rel="stylesheet" type="text/css" href="../../css/api.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/style.css"/>
		<style>
			html, body {
				background-color: #F5F6F6;
			}
			.content {
				opacity: 0;
				visibility: hidden;
				position: absolute;
				left: 0;
				top: 2px;
				width: 100%;
				height: auto;
				box-sizing: border-box;
				transition: all .3s;
			}
			.content table {
				width: 100%
			}
			.content td {
				border-bottom: 1px solid #DFE0E0;
				height: 60px;
			}
			.content td:nth-child(1) {
				padding-left: 10px;
			}
			.content td:nth-child(1) p:nth-child(2) {
				color: #555555
			}
			.content {
				background-color: #F5F6F6;
			}
			.content {
				opacity: 1;
				visibility: visible;
			}
			.Add {
				height: 40px;
				width: 96%;
				background-color: #1ABC9C;
				color: white;
				text-align: center;
				font-size: 15px;
				margin-top: 20px;
				outline: none;
			}
			.fontcolr {
				color: #cccccc
			}
			.clickfont {
				color: #72EDD1
			}
		</style>
	</head>
	<body>
		<div class="content">
			<table id="sjd">
				<tr style="background-color:#e6e6e6;width: 100%">
					<td><p style="font-weight: 100;font-size: 16px;color:#B8B8B8" id="projectname"></p></td>
					<td width="100"><p class="fontcolr"></p></td>
					<td width="30"></td>
				</tr>
				<tr v-for="(s,index) in sjd">
					<td><p style="font-weight: 800;font-size: 18px;" v-text="s.dataName"></p></td>
					<td width="100">
					<p class="fontcolr">
						2019-10-10
					</p></td>
					<td width="30"><img src="../../image/right.png" height="30%"  @click="data(s.id,s.dataName)"/></td>
				</tr>
			</table>
		</div>
	</body>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/vue.js"></script>
	<script type="text/javascript" src="../../script/jquery-1.11.0.min.js"></script>
	<script>
		apiready = function() {
			
			var departid = $api.getStorage('selectpor').id
			var area= $api.getStorage('selectpor');
//			alert(JSON.stringify(area));
			$("#projectname").text(area.projectName);
			//项目下数据点
			var apps = new Vue({
				el : '#sjd',
				data : {
					sjd : []
				},
				created : function() {
					$.ajax({
						type : "post",
						//async : false, //同步执行
						url : BaseServiceUrl+"mobile/showData/gettree.json",
						data : {
							id : departid
						},
						dataType : "json", //返回数据形式为json
						success : function(result) {
							
							for (var i = 0; i < result.length; i++) {
								apps.sjd.push(result[i]);
							}
						}
					});
				},
				methods : {
					data : function(id,name) {
						api.openFrame({
							name : 'xxxxx',
							url : '../detailed/datacharts_window.html',
							rect : {
								x : 0,
								y : 0,
								w : 'auto',
								h : 'auto'
							},
							pageParam : {
								id : id,
								name:name
							}, //传递参数
							bounces : true,
							delay : 200
						});
					}
				}
			})
		};
	</script>
</html>